﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoolCode.Entities;
using CoolCode.Linq;

namespace CoolCode.Services
{
    public interface IMembershipService:ISearchService<aspnet_Membership>
    {
        void Submit();

        aspnet_Membership GetUserByKey(Guid key);
        aspnet_Membership GetUserByName(string userName);
        aspnet_Membership GetUserByEmail(string email);
        void SaveUser(aspnet_Membership user);
        bool DeleteUser(string username, bool deleteAllRelatedData);
        PaginatedList<aspnet_Membership> PagingUserByName(string nameToSearch, PageParam p);
        PaginatedList<aspnet_Membership> PagingUserByEmail(string emailToSearch, PageParam p);
        PaginatedList<aspnet_Membership> PagingUser(IQueryBuilder<aspnet_Membership> queryBuilder, PageParam p);
        PaginatedList<aspnet_Membership> PagingUser(PageParam p);
        int GetNumberOfUsersOnline(DateTime lastActivityDate);
        bool ValidateEmail(string email, Guid excludeKey);
        bool ValidateUserName(string userName, Guid excludeKey);

        aspnet_Application GetApplicationByName(string name);
        void SaveApplication(aspnet_Application app);
    }
}
